package cn.devzyh.oms.coms.order.service;

import cn.devzyh.oms.common.core.util.R;
import cn.devzyh.oms.coms.flow.context.FlowContext;
import cn.devzyh.oms.coms.flow.executor.FlowNode;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * 促销计算工作流节点
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class PromoteOrderNode implements FlowNode {

	private static final String TEST = "test";

	@Override
	public R process(FlowContext ctx) {
		// 调用远程促销服务

		// 保存新增促销明细

		// 记录输出数据
		ctx.addResult(TEST, 1);

		return R.ok();
	}

}
